using FluentNHibernate.AutoMap;
using Web.App.Infrastructure.ObjectStore.Contracts;
using Webshop20.Infrastructure.Persistence.NH.AutoMappings.Conventions.Common;
using Webshop20.Infrastructure.Persistence.NH.AutoMappings.Conventions.Particular;

namespace Webshop20.Infrastructure.Persistence.NH.AutoMappings
{
    public class ForObjectStore
    {
        public static AutoPersistenceModel GetPersistenceModel()
        {

            return
                AutoPersistenceModel.MapEntitiesFromAssemblyOf<ObjectStoreItem>()
                    .Where(x => x.Name == typeof(ObjectStoreItem).Name)
                    .ConventionDiscovery.Setup(c => { c.Add<DataTypeConvention>(); c.Add<TableNameConvention>();/* c.Add<ObjectStoreItemConventions>();*/ });
        }
    }
}